**************************************************************************************
* THIS DO-FILE RESTRICT THE SAMPLE FOR DATA ANALYSIS IN FALCKE & VINK (2020)
* Falcke, S. & Vink, M. (2020). Closing a Backdoor to Dual Citizenship. The German Citizenship Law Reform of 2000.
* do-file written by Swantje Falcke
* November 2020
**************************************************************************************
* Observation window *
keep if syear>=1993 & syear<=2006 & treatment!=. & married!=. 
* Exclude migrants who change from foreign to German nationality, but change back at a later stage
drop if manynatchanges==-1
* Exclude migrants for whom the year of migration is unknown ***
drop if immiyear==-1
* Exclude migrants for whom the country of origin is unknow ***
drop if corigin==-1
drop if corigin==999
*Drop if naturalising before migrating***
drop if TimingNat<0
* Exclude Aussielder ***
drop if aussiedler2==1
drop if originaussiedler==1 & TimingNat<2
drop if max_biimgrp==2 
* Drop if younger than 16 at moment of migration ***
drop if age_mig<16 | age_mig==.
* Drop if year migration is after 2007 ***
drop if immiyear>2007
drop if corigin==98 | corigin==152 | corigin==156

keep if eligibility==1
keep if renunciation==1

